#include "global.h"
#include "modbus.h"
#include "device.h"

ushort Read_RO_word(ushort addr)
{
    return RO_WORD_FIRST[addr];
}

ushort Read_RW_word(ushort addr)
{
    return RW_WORD_FIRST[addr];
}

void Write_word(ushort addr, ushort val)
{
    RW_WORD_FIRST[addr] = val;
    if (addr == 10)
        pending_action = 1;
#ifdef AVOID_OBSTACLES
    else if (addr >= 0x19 && addr <= 0x28)
        astar_map_changed = 1;
#endif
}
